3.157 \(\int (c+d x)^3 (a+b \sin (e+f x))^2 \, dx\)

Optimal. Leaf size=250 \[ \frac{a^2 (c+d x)^4}{4 d}+\frac{12 a b d^2 (c+d x) \cos (e+f x)}{f^3}+\frac{6 a b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac{2 a b (c+d x)^3 \cos (e+f x)}{f}-\frac{12 a b d^3 \sin (e+f x)}{f^4}+\frac{3 b^2 d^2 (c+d x) \sin (e+f x) \cos (e+f x)}{4 f^3}-\frac{3 b^2 c d^2 x}{4 f^2}+\frac{3 b^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}-\frac{b^2 (c+d x)^3 \sin (e+f x) \cos (e+f x)}{2 f}+\frac{b^2 (c+d x)^4}{8 d}-\frac{3 b^2 d^3 \sin ^2(e+f x)}{8 f^4}-\frac{3 b^2 d^3 x^2}{8 f^2} \]

[Out]

(-3*b^2*c*d^2*x)/(4*f^2) - (3*b^2*d^3*x^2)/(8*f^2) + (a^2*(c + d*x)^4)/(4*d) + (b^2*(c + d*x)^4)/(8*d) + (12*a
*b*d^2*(c + d*x)*Cos[e + f*x])/f^3 - (2*a*b*(c + d*x)^3*Cos[e + f*x])/f - (12*a*b*d^3*Sin[e + f*x])/f^4 + (6*a
*b*d*(c + d*x)^2*Sin[e + f*x])/f^2 + (3*b^2*d^2*(c + d*x)*Cos[e + f*x]*Sin[e + f*x])/(4*f^3) - (b^2*(c + d*x)^
3*Cos[e + f*x]*Sin[e + f*x])/(2*f) - (3*b^2*d^3*Sin[e + f*x]^2)/(8*f^4) + (3*b^2*d*(c + d*x)^2*Sin[e + f*x]^2)
/(4*f^2)

________________________________________________________________________________________

Rubi [A]  time = 0.267118, antiderivative size = 250, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {3317, 3296, 2637, 3311, 32, 3310} \[ \frac{a^2 (c+d x)^4}{4 d}+\frac{12 a b d^2 (c+d x) \cos (e+f x)}{f^3}+\frac{6 a b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac{2 a b (c+d x)^3 \cos (e+f x)}{f}-\frac{12 a b d^3 \sin (e+f x)}{f^4}+\frac{3 b^2 d^2 (c+d x) \sin (e+f x) \cos (e+f x)}{4 f^3}-\frac{3 b^2 c d^2 x}{4 f^2}+\frac{3 b^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}-\frac{b^2 (c+d x)^3 \sin (e+f x) \cos (e+f x)}{2 f}+\frac{b^2 (c+d x)^4}{8 d}-\frac{3 b^2 d^3 \sin ^2(e+f x)}{8 f^4}-\frac{3 b^2 d^3 x^2}{8 f^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^3*(a + b*Sin[e + f*x])^2,x]

[Out]

(-3*b^2*c*d^2*x)/(4*f^2) - (3*b^2*d^3*x^2)/(8*f^2) + (a^2*(c + d*x)^4)/(4*d) + (b^2*(c + d*x)^4)/(8*d) + (12*a
*b*d^2*(c + d*x)*Cos[e + f*x])/f^3 - (2*a*b*(c + d*x)^3*Cos[e + f*x])/f - (12*a*b*d^3*Sin[e + f*x])/f^4 + (6*a
*b*d*(c + d*x)^2*Sin[e + f*x])/f^2 + (3*b^2*d^2*(c + d*x)*Cos[e + f*x]*Sin[e + f*x])/(4*f^3) - (b^2*(c + d*x)^
3*Cos[e + f*x]*Sin[e + f*x])/(2*f) - (3*b^2*d^3*Sin[e + f*x]^2)/(8*f^4) + (3*b^2*d*(c + d*x)^2*Sin[e + f*x]^2)
/(4*f^2)

Rule 3317

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3311

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(d*m*(c + d*x)^(m - 1)*(
b*Sin[e + f*x])^n)/(f^2*n^2), x] + (Dist[(b^2*(n - 1))/n, Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - D
ist[(d^2*m*(m - 1))/(f^2*n^2), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x] - Simp[(b*(c + d*x)^m*Cos[e +
f*x]*(b*Sin[e + f*x])^(n - 1))/(f*n), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 3310

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(d*(b*Sin[e + f*x])^n)/(f^2*n
^2), x] + (Dist[(b^2*(n - 1))/n, Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[(b*(c + d*x)*Cos[e + f*
x]*(b*Sin[e + f*x])^(n - 1))/(f*n), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rubi steps

\begin{align*} \int (c+d x)^3 (a+b \sin (e+f x))^2 \, dx &=\int \left (a^2 (c+d x)^3+2 a b (c+d x)^3 \sin (e+f x)+b^2 (c+d x)^3 \sin ^2(e+f x)\right ) \, dx\\ &=\frac{a^2 (c+d x)^4}{4 d}+(2 a b) \int (c+d x)^3 \sin (e+f x) \, dx+b^2 \int (c+d x)^3 \sin ^2(e+f x) \, dx\\ &=\frac{a^2 (c+d x)^4}{4 d}-\frac{2 a b (c+d x)^3 \cos (e+f x)}{f}-\frac{b^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}+\frac{3 b^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}+\frac{1}{2} b^2 \int (c+d x)^3 \, dx-\frac{\left (3 b^2 d^2\right ) \int (c+d x) \sin ^2(e+f x) \, dx}{2 f^2}+\frac{(6 a b d) \int (c+d x)^2 \cos (e+f x) \, dx}{f}\\ &=\frac{a^2 (c+d x)^4}{4 d}+\frac{b^2 (c+d x)^4}{8 d}-\frac{2 a b (c+d x)^3 \cos (e+f x)}{f}+\frac{6 a b d (c+d x)^2 \sin (e+f x)}{f^2}+\frac{3 b^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}-\frac{b^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}-\frac{3 b^2 d^3 \sin ^2(e+f x)}{8 f^4}+\frac{3 b^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}-\frac{\left (12 a b d^2\right ) \int (c+d x) \sin (e+f x) \, dx}{f^2}-\frac{\left (3 b^2 d^2\right ) \int (c+d x) \, dx}{4 f^2}\\ &=-\frac{3 b^2 c d^2 x}{4 f^2}-\frac{3 b^2 d^3 x^2}{8 f^2}+\frac{a^2 (c+d x)^4}{4 d}+\frac{b^2 (c+d x)^4}{8 d}+\frac{12 a b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac{2 a b (c+d x)^3 \cos (e+f x)}{f}+\frac{6 a b d (c+d x)^2 \sin (e+f x)}{f^2}+\frac{3 b^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}-\frac{b^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}-\frac{3 b^2 d^3 \sin ^2(e+f x)}{8 f^4}+\frac{3 b^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}-\frac{\left (12 a b d^3\right ) \int \cos (e+f x) \, dx}{f^3}\\ &=-\frac{3 b^2 c d^2 x}{4 f^2}-\frac{3 b^2 d^3 x^2}{8 f^2}+\frac{a^2 (c+d x)^4}{4 d}+\frac{b^2 (c+d x)^4}{8 d}+\frac{12 a b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac{2 a b (c+d x)^3 \cos (e+f x)}{f}-\frac{12 a b d^3 \sin (e+f x)}{f^4}+\frac{6 a b d (c+d x)^2 \sin (e+f x)}{f^2}+\frac{3 b^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}-\frac{b^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}-\frac{3 b^2 d^3 \sin ^2(e+f x)}{8 f^4}+\frac{3 b^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}\\ \end{align*}

Mathematica [A]  time = 1.298, size = 232, normalized size = 0.93 \[ \frac{2 f^4 x \left (2 a^2+b^2\right ) \left (6 c^2 d x+4 c^3+4 c d^2 x^2+d^3 x^3\right )+96 a b d \left (c^2 f^2+2 c d f^2 x+d^2 \left (f^2 x^2-2\right )\right ) \sin (e+f x)-32 a b f (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (f^2 x^2-6\right )\right ) \cos (e+f x)-2 b^2 f (c+d x) \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (2 f^2 x^2-3\right )\right ) \sin (2 (e+f x))-3 b^2 d \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (2 f^2 x^2-1\right )\right ) \cos (2 (e+f x))}{16 f^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^3*(a + b*Sin[e + f*x])^2,x]

[Out]

(2*(2*a^2 + b^2)*f^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3) - 32*a*b*f*(c + d*x)*(c^2*f^2 + 2*c*d*f^2*x
 + d^2*(-6 + f^2*x^2))*Cos[e + f*x] - 3*b^2*d*(2*c^2*f^2 + 4*c*d*f^2*x + d^2*(-1 + 2*f^2*x^2))*Cos[2*(e + f*x)
] + 96*a*b*d*(c^2*f^2 + 2*c*d*f^2*x + d^2*(-2 + f^2*x^2))*Sin[e + f*x] - 2*b^2*f*(c + d*x)*(2*c^2*f^2 + 4*c*d*
f^2*x + d^2*(-3 + 2*f^2*x^2))*Sin[2*(e + f*x)])/(16*f^4)

________________________________________________________________________________________

Maple [B]  time = 0.016, size = 1125, normalized size = 4.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^3*(a+b*sin(f*x+e))^2,x)

[Out]

1/f*(a^2*c^3*(f*x+e)+b^2*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-6/f^2*a*b*c*d^2*e^2*cos(f*x+e)+6/f*a*b
*c^2*d*e*cos(f*x+e)-12/f^2*a*b*c*d^2*e*(sin(f*x+e)-(f*x+e)*cos(f*x+e))+1/f^3*b^2*d^3*((f*x+e)^3*(-1/2*sin(f*x+
e)*cos(f*x+e)+1/2*f*x+1/2*e)-3/4*(f*x+e)^2*cos(f*x+e)^2+3/2*(f*x+e)*(1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-
3/8*(f*x+e)^2-3/8*sin(f*x+e)^2-3/8*(f*x+e)^4)-2*a*b*c^3*cos(f*x+e)+1/4*a^2/f^3*d^3*(f*x+e)^4-a^2/f^3*d^3*e*(f*
x+e)^3-a^2/f^3*d^3*e^3*(f*x+e)+a^2/f^2*c*d^2*(f*x+e)^3+3/2*a^2/f^3*d^3*e^2*(f*x+e)^2+3/2*a^2/f*c^2*d*(f*x+e)^2
+3/f^3*b^2*d^3*e^2*((f*x+e)*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/4*(f*x+e)^2+1/4*sin(f*x+e)^2)+3/f^2*b
^2*c*d^2*((f*x+e)^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/2*(f*x+e)*cos(f*x+e)^2+1/4*sin(f*x+e)*cos(f*x
+e)+1/4*f*x+1/4*e-1/3*(f*x+e)^3)+3/f^2*b^2*c*d^2*e^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-6/f^2*b^2*c*d^
2*e*((f*x+e)*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/4*(f*x+e)^2+1/4*sin(f*x+e)^2)-6/f^3*a*b*d^3*e*(-(f*x
+e)^2*cos(f*x+e)+2*cos(f*x+e)+2*(f*x+e)*sin(f*x+e))+6/f^3*a*b*d^3*e^2*(sin(f*x+e)-(f*x+e)*cos(f*x+e))+6/f^2*a*
b*c*d^2*(-(f*x+e)^2*cos(f*x+e)+2*cos(f*x+e)+2*(f*x+e)*sin(f*x+e))-3/f*b^2*c^2*d*e*(-1/2*sin(f*x+e)*cos(f*x+e)+
1/2*f*x+1/2*e)+2/f^3*a*b*d^3*e^3*cos(f*x+e)+6/f*a*b*c^2*d*(sin(f*x+e)-(f*x+e)*cos(f*x+e))-3*a^2/f^2*c*d^2*e*(f
*x+e)^2+3*a^2/f^2*c*d^2*e^2*(f*x+e)-3*a^2/f*c^2*d*e*(f*x+e)-1/f^3*b^2*d^3*e^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*
f*x+1/2*e)+3/f*b^2*c^2*d*((f*x+e)*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/4*(f*x+e)^2+1/4*sin(f*x+e)^2)+2
/f^3*a*b*d^3*(-(f*x+e)^3*cos(f*x+e)+3*(f*x+e)^2*sin(f*x+e)-6*sin(f*x+e)+6*(f*x+e)*cos(f*x+e))-3/f^3*b^2*d^3*e*
((f*x+e)^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/2*(f*x+e)*cos(f*x+e)^2+1/4*sin(f*x+e)*cos(f*x+e)+1/4*f
*x+1/4*e-1/3*(f*x+e)^3))

________________________________________________________________________________________

Maxima [B]  time = 1.13452, size = 1295, normalized size = 5.18 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+b*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

1/16*(16*(f*x + e)*a^2*c^3 + 4*(2*f*x + 2*e - sin(2*f*x + 2*e))*b^2*c^3 + 4*(f*x + e)^4*a^2*d^3/f^3 - 16*(f*x
+ e)^3*a^2*d^3*e/f^3 + 24*(f*x + e)^2*a^2*d^3*e^2/f^3 - 16*(f*x + e)*a^2*d^3*e^3/f^3 - 4*(2*f*x + 2*e - sin(2*
f*x + 2*e))*b^2*d^3*e^3/f^3 + 16*(f*x + e)^3*a^2*c*d^2/f^2 - 48*(f*x + e)^2*a^2*c*d^2*e/f^2 + 48*(f*x + e)*a^2
*c*d^2*e^2/f^2 + 12*(2*f*x + 2*e - sin(2*f*x + 2*e))*b^2*c*d^2*e^2/f^2 + 24*(f*x + e)^2*a^2*c^2*d/f - 48*(f*x
+ e)*a^2*c^2*d*e/f - 12*(2*f*x + 2*e - sin(2*f*x + 2*e))*b^2*c^2*d*e/f - 32*a*b*c^3*cos(f*x + e) + 32*a*b*d^3*
e^3*cos(f*x + e)/f^3 - 96*a*b*c*d^2*e^2*cos(f*x + e)/f^2 + 96*a*b*c^2*d*e*cos(f*x + e)/f - 96*((f*x + e)*cos(f
*x + e) - sin(f*x + e))*a*b*d^3*e^2/f^3 + 6*(2*(f*x + e)^2 - 2*(f*x + e)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e))*
b^2*d^3*e^2/f^3 + 192*((f*x + e)*cos(f*x + e) - sin(f*x + e))*a*b*c*d^2*e/f^2 - 12*(2*(f*x + e)^2 - 2*(f*x + e
)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e))*b^2*c*d^2*e/f^2 - 96*((f*x + e)*cos(f*x + e) - sin(f*x + e))*a*b*c^2*d/
f + 6*(2*(f*x + e)^2 - 2*(f*x + e)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e))*b^2*c^2*d/f + 96*(((f*x + e)^2 - 2)*co
s(f*x + e) - 2*(f*x + e)*sin(f*x + e))*a*b*d^3*e/f^3 - 2*(4*(f*x + e)^3 - 6*(f*x + e)*cos(2*f*x + 2*e) - 3*(2*
(f*x + e)^2 - 1)*sin(2*f*x + 2*e))*b^2*d^3*e/f^3 - 96*(((f*x + e)^2 - 2)*cos(f*x + e) - 2*(f*x + e)*sin(f*x +
e))*a*b*c*d^2/f^2 + 2*(4*(f*x + e)^3 - 6*(f*x + e)*cos(2*f*x + 2*e) - 3*(2*(f*x + e)^2 - 1)*sin(2*f*x + 2*e))*
b^2*c*d^2/f^2 - 32*(((f*x + e)^3 - 6*f*x - 6*e)*cos(f*x + e) - 3*((f*x + e)^2 - 2)*sin(f*x + e))*a*b*d^3/f^3 +
 (2*(f*x + e)^4 - 3*(2*(f*x + e)^2 - 1)*cos(2*f*x + 2*e) - 2*(2*(f*x + e)^3 - 3*f*x - 3*e)*sin(2*f*x + 2*e))*b
^2*d^3/f^3)/f

________________________________________________________________________________________

Fricas [A]  time = 2.17466, size = 805, normalized size = 3.22 \begin{align*} \frac{{\left (2 \, a^{2} + b^{2}\right )} d^{3} f^{4} x^{4} + 4 \,{\left (2 \, a^{2} + b^{2}\right )} c d^{2} f^{4} x^{3} + 3 \,{\left (2 \,{\left (2 \, a^{2} + b^{2}\right )} c^{2} d f^{4} + b^{2} d^{3} f^{2}\right )} x^{2} - 3 \,{\left (2 \, b^{2} d^{3} f^{2} x^{2} + 4 \, b^{2} c d^{2} f^{2} x + 2 \, b^{2} c^{2} d f^{2} - b^{2} d^{3}\right )} \cos \left (f x + e\right )^{2} + 2 \,{\left (2 \,{\left (2 \, a^{2} + b^{2}\right )} c^{3} f^{4} + 3 \, b^{2} c d^{2} f^{2}\right )} x - 16 \,{\left (a b d^{3} f^{3} x^{3} + 3 \, a b c d^{2} f^{3} x^{2} + a b c^{3} f^{3} - 6 \, a b c d^{2} f + 3 \,{\left (a b c^{2} d f^{3} - 2 \, a b d^{3} f\right )} x\right )} \cos \left (f x + e\right ) + 2 \,{\left (24 \, a b d^{3} f^{2} x^{2} + 48 \, a b c d^{2} f^{2} x + 24 \, a b c^{2} d f^{2} - 48 \, a b d^{3} -{\left (2 \, b^{2} d^{3} f^{3} x^{3} + 6 \, b^{2} c d^{2} f^{3} x^{2} + 2 \, b^{2} c^{3} f^{3} - 3 \, b^{2} c d^{2} f + 3 \,{\left (2 \, b^{2} c^{2} d f^{3} - b^{2} d^{3} f\right )} x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+b*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

1/8*((2*a^2 + b^2)*d^3*f^4*x^4 + 4*(2*a^2 + b^2)*c*d^2*f^4*x^3 + 3*(2*(2*a^2 + b^2)*c^2*d*f^4 + b^2*d^3*f^2)*x
^2 - 3*(2*b^2*d^3*f^2*x^2 + 4*b^2*c*d^2*f^2*x + 2*b^2*c^2*d*f^2 - b^2*d^3)*cos(f*x + e)^2 + 2*(2*(2*a^2 + b^2)
*c^3*f^4 + 3*b^2*c*d^2*f^2)*x - 16*(a*b*d^3*f^3*x^3 + 3*a*b*c*d^2*f^3*x^2 + a*b*c^3*f^3 - 6*a*b*c*d^2*f + 3*(a
*b*c^2*d*f^3 - 2*a*b*d^3*f)*x)*cos(f*x + e) + 2*(24*a*b*d^3*f^2*x^2 + 48*a*b*c*d^2*f^2*x + 24*a*b*c^2*d*f^2 -
48*a*b*d^3 - (2*b^2*d^3*f^3*x^3 + 6*b^2*c*d^2*f^3*x^2 + 2*b^2*c^3*f^3 - 3*b^2*c*d^2*f + 3*(2*b^2*c^2*d*f^3 - b
^2*d^3*f)*x)*cos(f*x + e))*sin(f*x + e))/f^4

________________________________________________________________________________________

Sympy [A]  time = 4.59935, size = 779, normalized size = 3.12 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**3*(a+b*sin(f*x+e))**2,x)

[Out]

Piecewise((a**2*c**3*x + 3*a**2*c**2*d*x**2/2 + a**2*c*d**2*x**3 + a**2*d**3*x**4/4 - 2*a*b*c**3*cos(e + f*x)/
f - 6*a*b*c**2*d*x*cos(e + f*x)/f + 6*a*b*c**2*d*sin(e + f*x)/f**2 - 6*a*b*c*d**2*x**2*cos(e + f*x)/f + 12*a*b
*c*d**2*x*sin(e + f*x)/f**2 + 12*a*b*c*d**2*cos(e + f*x)/f**3 - 2*a*b*d**3*x**3*cos(e + f*x)/f + 6*a*b*d**3*x*
*2*sin(e + f*x)/f**2 + 12*a*b*d**3*x*cos(e + f*x)/f**3 - 12*a*b*d**3*sin(e + f*x)/f**4 + b**2*c**3*x*sin(e + f
*x)**2/2 + b**2*c**3*x*cos(e + f*x)**2/2 - b**2*c**3*sin(e + f*x)*cos(e + f*x)/(2*f) + 3*b**2*c**2*d*x**2*sin(
e + f*x)**2/4 + 3*b**2*c**2*d*x**2*cos(e + f*x)**2/4 - 3*b**2*c**2*d*x*sin(e + f*x)*cos(e + f*x)/(2*f) - 3*b**
2*c**2*d*cos(e + f*x)**2/(4*f**2) + b**2*c*d**2*x**3*sin(e + f*x)**2/2 + b**2*c*d**2*x**3*cos(e + f*x)**2/2 -
3*b**2*c*d**2*x**2*sin(e + f*x)*cos(e + f*x)/(2*f) + 3*b**2*c*d**2*x*sin(e + f*x)**2/(4*f**2) - 3*b**2*c*d**2*
x*cos(e + f*x)**2/(4*f**2) + 3*b**2*c*d**2*sin(e + f*x)*cos(e + f*x)/(4*f**3) + b**2*d**3*x**4*sin(e + f*x)**2
/8 + b**2*d**3*x**4*cos(e + f*x)**2/8 - b**2*d**3*x**3*sin(e + f*x)*cos(e + f*x)/(2*f) + 3*b**2*d**3*x**2*sin(
e + f*x)**2/(8*f**2) - 3*b**2*d**3*x**2*cos(e + f*x)**2/(8*f**2) + 3*b**2*d**3*x*sin(e + f*x)*cos(e + f*x)/(4*
f**3) + 3*b**2*d**3*cos(e + f*x)**2/(8*f**4), Ne(f, 0)), ((a + b*sin(e))**2*(c**3*x + 3*c**2*d*x**2/2 + c*d**2
*x**3 + d**3*x**4/4), True))

________________________________________________________________________________________

Giac [A]  time = 1.12116, size = 501, normalized size = 2. \begin{align*} \frac{1}{4} \, a^{2} d^{3} x^{4} + \frac{1}{8} \, b^{2} d^{3} x^{4} + a^{2} c d^{2} x^{3} + \frac{1}{2} \, b^{2} c d^{2} x^{3} + \frac{3}{2} \, a^{2} c^{2} d x^{2} + \frac{3}{4} \, b^{2} c^{2} d x^{2} + a^{2} c^{3} x + \frac{1}{2} \, b^{2} c^{3} x - \frac{3 \,{\left (2 \, b^{2} d^{3} f^{2} x^{2} + 4 \, b^{2} c d^{2} f^{2} x + 2 \, b^{2} c^{2} d f^{2} - b^{2} d^{3}\right )} \cos \left (2 \, f x + 2 \, e\right )}{16 \, f^{4}} - \frac{2 \,{\left (a b d^{3} f^{3} x^{3} + 3 \, a b c d^{2} f^{3} x^{2} + 3 \, a b c^{2} d f^{3} x + a b c^{3} f^{3} - 6 \, a b d^{3} f x - 6 \, a b c d^{2} f\right )} \cos \left (f x + e\right )}{f^{4}} - \frac{{\left (2 \, b^{2} d^{3} f^{3} x^{3} + 6 \, b^{2} c d^{2} f^{3} x^{2} + 6 \, b^{2} c^{2} d f^{3} x + 2 \, b^{2} c^{3} f^{3} - 3 \, b^{2} d^{3} f x - 3 \, b^{2} c d^{2} f\right )} \sin \left (2 \, f x + 2 \, e\right )}{8 \, f^{4}} + \frac{6 \,{\left (a b d^{3} f^{2} x^{2} + 2 \, a b c d^{2} f^{2} x + a b c^{2} d f^{2} - 2 \, a b d^{3}\right )} \sin \left (f x + e\right )}{f^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+b*sin(f*x+e))^2,x, algorithm="giac")

[Out]

1/4*a^2*d^3*x^4 + 1/8*b^2*d^3*x^4 + a^2*c*d^2*x^3 + 1/2*b^2*c*d^2*x^3 + 3/2*a^2*c^2*d*x^2 + 3/4*b^2*c^2*d*x^2
+ a^2*c^3*x + 1/2*b^2*c^3*x - 3/16*(2*b^2*d^3*f^2*x^2 + 4*b^2*c*d^2*f^2*x + 2*b^2*c^2*d*f^2 - b^2*d^3)*cos(2*f
*x + 2*e)/f^4 - 2*(a*b*d^3*f^3*x^3 + 3*a*b*c*d^2*f^3*x^2 + 3*a*b*c^2*d*f^3*x + a*b*c^3*f^3 - 6*a*b*d^3*f*x - 6
*a*b*c*d^2*f)*cos(f*x + e)/f^4 - 1/8*(2*b^2*d^3*f^3*x^3 + 6*b^2*c*d^2*f^3*x^2 + 6*b^2*c^2*d*f^3*x + 2*b^2*c^3*
f^3 - 3*b^2*d^3*f*x - 3*b^2*c*d^2*f)*sin(2*f*x + 2*e)/f^4 + 6*(a*b*d^3*f^2*x^2 + 2*a*b*c*d^2*f^2*x + a*b*c^2*d
*f^2 - 2*a*b*d^3)*sin(f*x + e)/f^4